package com.wcll.www;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class IncreaseSortBean {
	private static Connection con = null;
	public static Connection getCon() throws ClassNotFoundException, SQLException {
		if(con == null){
			Class.forName("com.mysql.jdbc.Driver");
			con = DriverManager.getConnection("jdbc:mysql://localhost/jobs?useUnicode=true&characterEncoding=UTF8","root","");
		}	
		return con;
}
	public void setCon(Connection con) {
		this.con = con;
	}
		public boolean increaseSort(String sort){
			boolean flags = false; 
			try{
			con = IncreaseSortBean.getCon();
			Statement st = con.createStatement();
			st.execute("insert into job_assort values (null,'"+sort+"')");
			if(st.getUpdateCount()==1){
					flags=true;
				}
			st.close();
			}catch(Exception e){}
			return flags;	
			
			}
		public boolean increaseJSAvatarSort(int a, String jaa_name){
			boolean flags= false;
			try{
				con = IncreaseSortBean.getCon();
				Statement st = con.createStatement();
				st.execute("insert into job_assort_avatar values (null,'"+a+"','"+jaa_name+"')");
				if(st.getUpdateCount()==1){
					flags = true;
				}
			}catch(Exception e){}
			return flags;
		}

}